{"ast":null,"code":"var _jsxFileName = \"/data/messenger.client/src/modules/ChangeProfileForm/components/ChangeProfileForm.tsx\",\n  _s = $RefreshSig$();\nimport React from 'react';\nimport { Controller, useForm, useFormState } from \"react-hook-form\";\nimport { nicknameChangeValidation, firstNameChangeValidation, lastNameChangeValidation, passwordChangeValidation, confirmChangePassword } from '../../validation';\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport AlternateEmailOutlinedIcon from \"@mui/icons-material/AlternateEmailOutlined\";\nimport VpnKeyOutlinedIcon from \"@mui/icons-material/VpnKeyOutlined\";\nimport Button from \"../../../components/Button\";\nimport Switch from '@mui/material/Switch';\nimport BadgeOutlinedIcon from '@mui/icons-material/BadgeOutlined';\nimport { Context } from \"../../../index\";\nimport { observer } from \"mobx-react-lite\";\nimport styles from \"../../Form.module.scss\";\nimport \"./ChangeProfileForm.scss\";\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\nconst ChangeProfileForm = _ref => {\n  _s();\n  let {\n    profile,\n    cancel\n  } = _ref;\n  const {\n    store\n  } = React.useContext(Context);\n  const {\n    handleSubmit,\n    control,\n    watch\n  } = useForm();\n  const {\n    errors\n  } = useFormState({\n    control\n  });\n  const [switchEmail, setSwitchEmail] = React.useState(false);\n  const [fieldDefaultNickName, setFieldDefaultNickName] = React.useState(profile.nickname);\n  const [fieldDefaultFirstName, setFieldDefaultFirstName] = React.useState(profile.firstName || '');\n  const [fieldDefaultLastName, setFieldDefaultLastName] = React.useState(profile.lastName || '');\n  React.useEffect(() => {\n    profile.hideEmail && setSwitchEmail(profile.hideEmail);\n  }, [profile]);\n  const onSubmit = data => {\n    var _data$nickname, _data$password, _data$confirmPassword;\n    if (data.firstName === profile.firstName) {\n      delete data.firstName;\n    }\n    if (data.lastName === profile.lastName) {\n      delete data.lastName;\n    }\n    if (((_data$nickname = data.nickname) === null || _data$nickname === void 0 ? void 0 : _data$nickname.length) === 0 || data.nickname === profile.nickname) {\n      delete data.nickname;\n    }\n    if (data.hideEmail === profile.hideEmail) {\n      delete data.hideEmail;\n    }\n    if (((_data$password = data.password) === null || _data$password === void 0 ? void 0 : _data$password.length) === 0 || ((_data$confirmPassword = data.confirmPassword) === null || _data$confirmPassword === void 0 ? void 0 : _data$confirmPassword.length) === 0) {\n      delete data.password;\n      delete data.confirmPassword;\n    }\n    if (JSON.stringify(data) === '{}') {\n      return cancel();\n    } else {\n      return store.updateProfileFromAPI(data);\n    }\n  };\n  return /*#__PURE__*/_jsxDEV(\"div\", {\n    className: \"changeProfile\",\n    children: [/*#__PURE__*/_jsxDEV(Typography, {\n      className: \"changeProfile__title\",\n      variant: \"h4\",\n      component: \"div\",\n      children: \"\\u0418\\u0437\\u043C\\u0435\\u043D\\u0435\\u043D\\u0438\\u0435 \\u043F\\u0440\\u043E\\u0444\\u0438\\u043B\\u044F\"\n    }, void 0, false, {\n      fileName: _jsxFileName,\n      lineNumber: 63,\n      columnNumber: 13\n    }, this), /*#__PURE__*/_jsxDEV(\"form\", {\n      className: \"changeProfile__form\",\n      onSubmit: handleSubmit(onSubmit),\n      children: [/*#__PURE__*/_jsxDEV(Controller, {\n        control: control,\n        name: \"nickname\",\n        defaultValue: fieldDefaultNickName,\n        rules: nicknameChangeValidation,\n        render: _ref2 => {\n          var _errors$nickname, _errors$nickname2;\n          let {\n            field\n          } = _ref2;\n          return /*#__PURE__*/_jsxDEV(TextField, {\n            label: \"\\u041F\\u0441\\u0435\\u0432\\u0434\\u043E\\u043D\\u0438\\u043C\",\n            className: \"changeProfile__form-field\",\n            InputProps: {\n              endAdornment: /*#__PURE__*/_jsxDEV(AlternateEmailOutlinedIcon, {\n                className: styles.formIcon\n              }, void 0, false, {\n                fileName: _jsxFileName,\n                lineNumber: 79,\n                columnNumber: 37\n              }, this)\n            },\n            onChange: e => {\n              field.onChange(e);\n              setFieldDefaultNickName(field.value || '');\n            },\n            value: field.value || fieldDefaultNickName,\n            fullWidth: true,\n            size: \"small\",\n            margin: \"normal\",\n            type: \"text\",\n            error: !!((_errors$nickname = errors.nickname) !== null && _errors$nickname !== void 0 && _errors$nickname.message),\n            helperText: (_errors$nickname2 = errors.nickname) === null || _errors$nickname2 === void 0 ? void 0 : _errors$nickname2.message\n          }, void 0, false, {\n            fileName: _jsxFileName,\n            lineNumber: 74,\n            columnNumber: 25\n          }, this);\n        }\n      }, void 0, false, {\n        fileName: _jsxFileName,\n        lineNumber: 68,\n        columnNumber: 17\n      }, this), /*#__PURE__*/_jsxDEV(Controller, {\n        control: control,\n        name: \"firstName\",\n        defaultValue: fieldDefaultFirstName,\n        rules: firstNameChangeValidation,\n        render: _ref3 => {\n          var _errors$firstName, _errors$firstName2;\n          let {\n            field\n          } = _ref3;\n          return /*#__PURE__*/_jsxDEV(TextField, {\n            label: \"\\u0418\\u043C\\u044F\",\n            InputProps: {\n              endAdornment: /*#__PURE__*/_jsxDEV(BadgeOutlinedIcon, {\n                className: styles.formIcon\n              }, void 0, false, {\n                fileName: _jsxFileName,\n                lineNumber: 106,\n                columnNumber: 37\n              }, this)\n            },\n            onChange: e => {\n              field.onChange(e);\n              setFieldDefaultFirstName(field.value || '');\n            },\n            value: field.value || fieldDefaultFirstName,\n            fullWidth: true,\n            size: \"small\",\n            margin: \"normal\",\n            type: \"text\",\n            error: !!((_errors$firstName = errors.firstName) !== null && _errors$firstName !== void 0 && _errors$firstName.message),\n            helperText: (_errors$firstName2 = errors.firstName) === null || _errors$firstName2 === void 0 ? void 0 : _errors$firstName2.message\n          }, void 0, false, {\n            fileName: _jsxFileName,\n            lineNumber: 102,\n            columnNumber: 25\n          }, this);\n        }\n      }, void 0, false, {\n        fileName: _jsxFileName,\n        lineNumber: 96,\n        columnNumber: 17\n      }, this), /*#__PURE__*/_jsxDEV(Controller, {\n        control: control,\n        name: \"lastName\",\n        defaultValue: fieldDefaultLastName,\n        rules: lastNameChangeValidation,\n        render: _ref4 => {\n          var _errors$lastName, _errors$lastName2;\n          let {\n            field\n          } = _ref4;\n          return /*#__PURE__*/_jsxDEV(TextField, {\n            label: \"\\u0424\\u0430\\u043C\\u0438\\u043B\\u0438\\u044F\",\n            InputProps: {\n              endAdornment: /*#__PURE__*/_jsxDEV(BadgeOutlinedIcon, {\n                className: styles.formIcon\n              }, void 0, false, {\n                fileName: _jsxFileName,\n                lineNumber: 133,\n                columnNumber: 37\n              }, this)\n            },\n            onChange: e => {\n              field.onChange(e);\n              setFieldDefaultLastName(field.value || '');\n            },\n            value: field.value || fieldDefaultLastName,\n            fullWidth: true,\n            size: \"small\",\n            margin: \"normal\",\n            type: \"text\",\n            error: !!((_errors$lastName = errors.lastName) !== null && _errors$lastName !== void 0 && _errors$lastName.message),\n            helperText: (_errors$lastName2 = errors.lastName) === null || _errors$lastName2 === void 0 ? void 0 : _errors$lastName2.message\n          }, void 0, false, {\n            fileName: _jsxFileName,\n            lineNumber: 129,\n            columnNumber: 25\n          }, this);\n        }\n      }, void 0, false, {\n        fileName: _jsxFileName,\n        lineNumber: 123,\n        columnNumber: 17\n      }, this), /*#__PURE__*/_jsxDEV(Controller, {\n        control: control,\n        name: \"password\",\n        rules: passwordChangeValidation,\n        render: _ref5 => {\n          var _errors$password, _errors$password2;\n          let {\n            field\n          } = _ref5;\n          return /*#__PURE__*/_jsxDEV(TextField, {\n            label: \"\\u041F\\u0430\\u0440\\u043E\\u043B\\u044C\",\n            InputProps: {\n              endAdornment: /*#__PURE__*/_jsxDEV(VpnKeyOutlinedIcon, {\n                className: styles.formIcon\n              }, void 0, false, {\n                fileName: _jsxFileName,\n                lineNumber: 159,\n                columnNumber: 37\n              }, this)\n            },\n            onChange: e => field.onChange(e),\n            value: field.value || '',\n            fullWidth: true,\n            size: \"small\",\n            margin: \"normal\",\n            type: \"password\",\n            autoComplete: \"off\",\n            helperText: (_errors$password = errors.password) === null || _errors$password === void 0 ? void 0 : _errors$password.message,\n            error: !!((_errors$password2 = errors.password) !== null && _errors$password2 !== void 0 && _errors$password2.message)\n          }, void 0, false, {\n            fileName: _jsxFileName,\n            lineNumber: 155,\n            columnNumber: 25\n          }, this);\n        }\n      }, void 0, false, {\n        fileName: _jsxFileName,\n        lineNumber: 150,\n        columnNumber: 17\n      }, this), /*#__PURE__*/_jsxDEV(Controller, {\n        control: control,\n        name: \"confirmPassword\"\n        // @ts-ignore\n        ,\n        rules: confirmChangePassword(watch('password'), watch('confirmPassword')),\n        render: _ref6 => {\n          var _errors$confirmPasswo, _errors$confirmPasswo2;\n          let {\n            field\n          } = _ref6;\n          return /*#__PURE__*/_jsxDEV(TextField, {\n            label: \"\\u041F\\u043E\\u0432\\u0442\\u043E\\u0440\\u0438\\u0442\\u0435 \\u043F\\u0430\\u0440\\u043E\\u043B\\u044C\",\n            InputProps: {\n              endAdornment: /*#__PURE__*/_jsxDEV(VpnKeyOutlinedIcon, {\n                className: styles.formIcon\n              }, void 0, false, {\n                fileName: _jsxFileName,\n                lineNumber: 184,\n                columnNumber: 37\n              }, this)\n            },\n            onChange: e => field.onChange(e),\n            value: field.value || '',\n            fullWidth: true,\n            size: \"small\",\n            margin: \"normal\",\n            type: \"password\",\n            autoComplete: \"off\",\n            helperText: (_errors$confirmPasswo = errors.confirmPassword) === null || _errors$confirmPasswo === void 0 ? void 0 : _errors$confirmPasswo.message,\n            error: !!((_errors$confirmPasswo2 = errors.confirmPassword) !== null && _errors$confirmPasswo2 !== void 0 && _errors$confirmPasswo2.message)\n          }, void 0, false, {\n            fileName: _jsxFileName,\n            lineNumber: 180,\n            columnNumber: 25\n          }, this);\n        }\n      }, void 0, false, {\n        fileName: _jsxFileName,\n        lineNumber: 174,\n        columnNumber: 17\n      }, this), /*#__PURE__*/_jsxDEV(Controller, {\n        control: control,\n        name: \"hideEmail\",\n        defaultValue: switchEmail,\n        render: _ref7 => {\n          let {\n            field\n          } = _ref7;\n          return /*#__PURE__*/_jsxDEV(\"div\", {\n            className: \"changeProfile__form-switchLabel\",\n            children: [/*#__PURE__*/_jsxDEV(Switch, {\n              onChange: e => {\n                field.onChange(e);\n                console.log(field.value);\n                setSwitchEmail(!switchEmail);\n              },\n              value: switchEmail,\n              defaultChecked: true\n            }, void 0, false, {\n              fileName: _jsxFileName,\n              lineNumber: 205,\n              columnNumber: 29\n            }, this), switchEmail && /*#__PURE__*/_jsxDEV(\"label\", {\n              children: \"\\u0414\\u0435\\u043B\\u0430\\u0435\\u0442 Email \\u0441\\u043A\\u0440\\u044B\\u0442\\u044B\\u043C \\u0434\\u043B\\u044F \\u043F\\u043E\\u043B\\u044C\\u0437\\u043E\\u0432\\u0430\\u0442\\u0435\\u043B\\u0435\\u0439\"\n            }, void 0, false, {\n              fileName: _jsxFileName,\n              lineNumber: 215,\n              columnNumber: 33\n            }, this) || /*#__PURE__*/_jsxDEV(\"label\", {\n              children: \"\\u0414\\u0435\\u043B\\u0430\\u0435\\u0442 Email \\u0432\\u0438\\u0434\\u0438\\u043C\\u044B\\u043C \\u0434\\u043B\\u044F \\u043F\\u043E\\u043B\\u044C\\u0437\\u043E\\u0432\\u0430\\u0442\\u0435\\u043B\\u0435\\u0439\"\n            }, void 0, false, {\n              fileName: _jsxFileName,\n              lineNumber: 217,\n              columnNumber: 33\n            }, this)]\n          }, void 0, true, {\n            fileName: _jsxFileName,\n            lineNumber: 204,\n            columnNumber: 25\n          }, this);\n        }\n      }, void 0, false, {\n        fileName: _jsxFileName,\n        lineNumber: 199,\n        columnNumber: 17\n      }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n        className: \"changeProfile__form-groupButton\",\n        children: [/*#__PURE__*/_jsxDEV(Button, {\n          fullWidth: false,\n          text: 'Вернуться',\n          callback: cancel\n        }, void 0, false, {\n          fileName: _jsxFileName,\n          lineNumber: 223,\n          columnNumber: 21\n        }, this), /*#__PURE__*/_jsxDEV(Button, {\n          fullWidth: false,\n          text: 'Применить изменения',\n          customClassName: \"messenger__sidebar-profileControl-changeProfile\"\n        }, void 0, false, {\n          fileName: _jsxFileName,\n          lineNumber: 228,\n          columnNumber: 21\n        }, this)]\n      }, void 0, true, {\n        fileName: _jsxFileName,\n        lineNumber: 222,\n        columnNumber: 17\n      }, this)]\n    }, void 0, true, {\n      fileName: _jsxFileName,\n      lineNumber: 67,\n      columnNumber: 13\n    }, this)]\n  }, void 0, true, {\n    fileName: _jsxFileName,\n    lineNumber: 62,\n    columnNumber: 9\n  }, this);\n};\n_s(ChangeProfileForm, \"g4wMM5kKc+m+pPXIH7WMwyzxwOk=\", false, function () {\n  return [useForm, useFormState];\n});\n_c = ChangeProfileForm;\nexport default _c2 = observer(ChangeProfileForm);\nvar _c, _c2;\n$RefreshReg$(_c, \"ChangeProfileForm\");\n$RefreshReg$(_c2, \"%default%\");","map":{"version":3,"names":["React","Controller","useForm","useFormState","nicknameChangeValidation","firstNameChangeValidation","lastNameChangeValidation","passwordChangeValidation","confirmChangePassword","Typography","TextField","AlternateEmailOutlinedIcon","VpnKeyOutlinedIcon","Button","Switch","BadgeOutlinedIcon","Context","observer","styles","ChangeProfileForm","profile","cancel","store","useContext","handleSubmit","control","watch","errors","switchEmail","setSwitchEmail","useState","fieldDefaultNickName","setFieldDefaultNickName","nickname","fieldDefaultFirstName","setFieldDefaultFirstName","firstName","fieldDefaultLastName","setFieldDefaultLastName","lastName","useEffect","hideEmail","onSubmit","data","length","password","confirmPassword","JSON","stringify","updateProfileFromAPI","field","endAdornment","formIcon","e","onChange","value","message","console","log"],"sources":["/data/messenger.client/src/modules/ChangeProfileForm/components/ChangeProfileForm.tsx"],"sourcesContent":["import React from 'react';\nimport ProfileRequest from \"../../../models/request/ProfileRequest\";\nimport {UserListItem} from \"../../../models/response/UserListItem\";\nimport {Controller, SubmitHandler, useForm, useFormState} from \"react-hook-form\";\nimport {\n    nicknameChangeValidation,\n    firstNameChangeValidation,\n    lastNameChangeValidation,\n    passwordChangeValidation,\n    confirmChangePassword,\n} from '../../validation';\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport AlternateEmailOutlinedIcon from \"@mui/icons-material/AlternateEmailOutlined\";\nimport VpnKeyOutlinedIcon from \"@mui/icons-material/VpnKeyOutlined\";\nimport Button from \"../../../components/Button\";\nimport Switch from '@mui/material/Switch';\nimport BadgeOutlinedIcon from '@mui/icons-material/BadgeOutlined';\nimport {Context} from \"../../../index\";\nimport {observer} from \"mobx-react-lite\";\nimport styles from \"../../Form.module.scss\";\nimport \"./ChangeProfileForm.scss\";\n\nconst ChangeProfileForm = ({profile, cancel}: {profile: UserListItem, cancel: () => void}) => {\n    const {store} = React.useContext(Context);\n    const {handleSubmit, control, watch} = useForm<ProfileRequest>();\n    const {errors} = useFormState({control});\n    const [switchEmail, setSwitchEmail] = React.useState<boolean>(false);\n    const [fieldDefaultNickName, setFieldDefaultNickName] = React.useState<string>(profile.nickname);\n    const [fieldDefaultFirstName, setFieldDefaultFirstName] = React.useState<string>(profile.firstName || '');\n    const [fieldDefaultLastName, setFieldDefaultLastName] = React.useState<string>(profile.lastName || '');\n\n    React.useEffect(() => {\n        profile.hideEmail && setSwitchEmail(profile.hideEmail);\n    }, [profile]);\n\n    const onSubmit: SubmitHandler<ProfileRequest> = (data) => {\n        if (data.firstName === profile.firstName) {\n            delete data.firstName;\n        }\n        if (data.lastName === profile.lastName) {\n            delete data.lastName;\n        }\n        if (data.nickname?.length === 0 || data.nickname === profile.nickname) {\n            delete data.nickname;\n        }\n        if (data.hideEmail === profile.hideEmail) {\n            delete data.hideEmail;\n        }\n        if (data.password?.length === 0 || data.confirmPassword?.length === 0) {\n            delete data.password;\n            delete data.confirmPassword;\n        }\n        if (JSON.stringify(data) === '{}') {\n            return cancel();\n        } else {\n            return store.updateProfileFromAPI(data);\n        }\n    };\n\n    return (\n        <div className='changeProfile'>\n            <Typography className='changeProfile__title' variant=\"h4\" component=\"div\">\n                Изменение профиля\n            </Typography>\n\n            <form className='changeProfile__form' onSubmit={handleSubmit(onSubmit)}>\n                <Controller\n                    control={control}\n                    name=\"nickname\"\n                    defaultValue={fieldDefaultNickName}\n                    rules={nicknameChangeValidation}\n                    render={({ field }) => (\n                        <TextField\n                            label=\"Псевдоним\"\n                            className=\"changeProfile__form-field\"\n                            InputProps={{\n                                endAdornment: (\n                                    <AlternateEmailOutlinedIcon className={styles.formIcon}/>\n                                ),\n                            }}\n                            onChange={(e) => {\n                                field.onChange(e);\n                                setFieldDefaultNickName(field.value || '');\n                            }}\n                            value={field.value || fieldDefaultNickName}\n                            fullWidth={ true }\n                            size=\"small\"\n                            margin=\"normal\"\n                            type=\"text\"\n                            error={!!errors.nickname?.message}\n                            helperText={errors.nickname?.message}\n                        />\n                    )}\n                />\n                <Controller\n                    control={control}\n                    name=\"firstName\"\n                    defaultValue={fieldDefaultFirstName}\n                    rules={firstNameChangeValidation}\n                    render={({ field }) => (\n                        <TextField\n                            label=\"Имя\"\n                            InputProps={{\n                                endAdornment: (\n                                    <BadgeOutlinedIcon className={styles.formIcon}/>\n                                ),\n                            }}\n                            onChange={(e) => {\n                                field.onChange(e);\n                                setFieldDefaultFirstName(field.value || '');\n                            }}\n                            value={field.value || fieldDefaultFirstName}\n                            fullWidth={ true }\n                            size=\"small\"\n                            margin=\"normal\"\n                            type=\"text\"\n                            error={!!errors.firstName?.message}\n                            helperText={errors.firstName?.message}\n                        />\n                    )}\n                />\n                <Controller\n                    control={control}\n                    name=\"lastName\"\n                    defaultValue={fieldDefaultLastName}\n                    rules={lastNameChangeValidation}\n                    render={({ field }) => (\n                        <TextField\n                            label=\"Фамилия\"\n                            InputProps={{\n                                endAdornment: (\n                                    <BadgeOutlinedIcon className={styles.formIcon}/>\n                                ),\n                            }}\n                            onChange={(e) => {\n                                field.onChange(e);\n                                setFieldDefaultLastName(field.value || '');\n                            }}\n                            value={field.value || fieldDefaultLastName}\n                            fullWidth={ true }\n                            size=\"small\"\n                            margin=\"normal\"\n                            type=\"text\"\n                            error={!!errors.lastName?.message}\n                            helperText={errors.lastName?.message}\n                        />\n                    )}\n                />\n                <Controller\n                    control={control}\n                    name=\"password\"\n                    rules={passwordChangeValidation}\n                    render={({ field }) => (\n                        <TextField\n                            label=\"Пароль\"\n                            InputProps={{\n                                endAdornment: (\n                                    <VpnKeyOutlinedIcon className={styles.formIcon}/>\n                                ),\n                            }}\n                            onChange={(e) => field.onChange(e)}\n                            value={field.value || ''}\n                            fullWidth={ true }\n                            size=\"small\"\n                            margin=\"normal\"\n                            type=\"password\"\n                            autoComplete=\"off\"\n                            helperText={errors.password?.message}\n                            error={!!errors.password?.message}\n                        />\n                    )}\n                />\n                <Controller\n                    control={control}\n                    name=\"confirmPassword\"\n                    // @ts-ignore\n                    rules={confirmChangePassword(watch('password'), watch('confirmPassword'))}\n                    render={({ field }) => (\n                        <TextField\n                            label=\"Повторите пароль\"\n                            InputProps={{\n                                endAdornment: (\n                                    <VpnKeyOutlinedIcon className={styles.formIcon}/>\n                                ),\n                            }}\n                            onChange={(e) => field.onChange(e)}\n                            value={field.value || ''}\n                            fullWidth={ true }\n                            size=\"small\"\n                            margin=\"normal\"\n                            type=\"password\"\n                            autoComplete=\"off\"\n                            helperText={errors.confirmPassword?.message}\n                            error={!!errors.confirmPassword?.message}\n                        />\n                    )}\n                />\n                <Controller\n                    control={control}\n                    name=\"hideEmail\"\n                    defaultValue={switchEmail}\n                    render={({ field }) => (\n                        <div className=\"changeProfile__form-switchLabel\">\n                            <Switch\n                                onChange={(e) => {\n                                    field.onChange(e);\n                                    console.log(field.value)\n                                    setSwitchEmail(!switchEmail);\n                                }}\n                                value={switchEmail}\n                                defaultChecked\n                            />\n                            {(switchEmail &&\n                                <label>Делает Email скрытым для пользователей</label>\n                            ) ||\n                                <label>Делает Email видимым для пользователей</label>\n                            }\n                        </div>\n                    )}\n                />\n                <div className=\"changeProfile__form-groupButton\">\n                    <Button\n                        fullWidth={false}\n                        text={'Вернуться'}\n                        callback={cancel}\n                    />\n                    <Button\n                        fullWidth={false}\n                        text={'Применить изменения'}\n                        customClassName=\"messenger__sidebar-profileControl-changeProfile\"\n                    />\n                </div>\n            </form>\n        </div>\n    );\n}\n\nexport default observer(ChangeProfileForm);"],"mappings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